\begin{figure}[ht!]
\begin{center}
\begin{tikzpicture}
[scale=0.65, nodes={scale=0.65, minimum size=26},
redcell/.style={draw=red!50,fill=red!50},
lbluecell/.style={draw=blue!10,fill=blue!10},
]
{
\node(0) at (0,-1.2) [redcell] {0};
\node(1) at (1,-1.2) [lbluecell] {\textbf{m}$_{0}$};
\node(2) at (2,-1.2) [lbluecell] {\textbf{i}$_{1}$};
\node(3) at (3,-1.2) [lbluecell] {\textbf{n}$_{2}$};
\node(4) at (4,-1.2) [lbluecell] {\textbf{i}$_{3}$};
\node(5) at (5,-1.2) [lbluecell] {\textbf{n}$_{4}$};
\node(6) at (6,-1.2) [lbluecell] {\textbf{g}$_{5}$};
\node(7) at (7,-1.2) [lbluecell] {\textbf{␣}$_{6}$};
\node(8) at (8,-1.2) [lbluecell] {\textbf{e}$_{7}$};
\node(9) at (9,-1.2) [lbluecell] {\textbf{n}$_{8}$};
\node(10) at (10,-1.2) [lbluecell] {\textbf{g}$_{9}$};
\node(11) at (11,-1.2) [lbluecell] {\textbf{i}$_{10}$};
\node(12) at (12,-1.2) [lbluecell] {\textbf{n}$_{11}$};
\node(13) at (13,-1.2) [lbluecell] {\textbf{e}$_{12}$};
\node(14) at (14,-1.2) [lbluecell] {\textbf{e}$_{13}$};
\node(15) at (15,-1.2) [lbluecell] {\textbf{r}$_{14}$};
\node(16) at (16,-1.2) [lbluecell] {\textbf{i}$_{15}$};
\node(17) at (17,-1.2) [lbluecell] {\textbf{n}$_{16}$};
\node(18) at (18,-1.2) [lbluecell] {\textbf{g}$_{17}$};
\node(19) at (19,-1.2) [lbluecell] {\textbf{\#}$_{18}$};
\node(20) at (0,-2.2) [redcell] {1};
\node(21) at (1,-2.2) [lbluecell] {\textbf{i}$_{1}$};
\node(22) at (2,-2.2) [lbluecell] {\textbf{n}$_{2}$};
\node(23) at (3,-2.2) [lbluecell] {\textbf{i}$_{3}$};
\node(24) at (4,-2.2) [lbluecell] {\textbf{n}$_{4}$};
\node(25) at (5,-2.2) [lbluecell] {\textbf{g}$_{5}$};
\node(26) at (6,-2.2) [lbluecell] {\textbf{␣}$_{6}$};
\node(27) at (7,-2.2) [lbluecell] {\textbf{e}$_{7}$};
\node(28) at (8,-2.2) [lbluecell] {\textbf{n}$_{8}$};
\node(29) at (9,-2.2) [lbluecell] {\textbf{g}$_{9}$};
\node(30) at (10,-2.2) [lbluecell] {\textbf{i}$_{10}$};
\node(31) at (11,-2.2) [lbluecell] {\textbf{n}$_{11}$};
\node(32) at (12,-2.2) [lbluecell] {\textbf{e}$_{12}$};
\node(33) at (13,-2.2) [lbluecell] {\textbf{e}$_{13}$};
\node(34) at (14,-2.2) [lbluecell] {\textbf{r}$_{14}$};
\node(35) at (15,-2.2) [lbluecell] {\textbf{i}$_{15}$};
\node(36) at (16,-2.2) [lbluecell] {\textbf{n}$_{16}$};
\node(37) at (17,-2.2) [lbluecell] {\textbf{g}$_{17}$};
\node(38) at (18,-2.2) [lbluecell] {\textbf{\#}$_{18}$};
\node(39) at (0,-3.2) [redcell] {2};
\node(40) at (1,-3.2) [lbluecell] {\textbf{n}$_{2}$};
\node(41) at (2,-3.2) [lbluecell] {\textbf{i}$_{3}$};
\node(42) at (3,-3.2) [lbluecell] {\textbf{n}$_{4}$};
\node(43) at (4,-3.2) [lbluecell] {\textbf{g}$_{5}$};
\node(44) at (5,-3.2) [lbluecell] {\textbf{␣}$_{6}$};
\node(45) at (6,-3.2) [lbluecell] {\textbf{e}$_{7}$};
\node(46) at (7,-3.2) [lbluecell] {\textbf{n}$_{8}$};
\node(47) at (8,-3.2) [lbluecell] {\textbf{g}$_{9}$};
\node(48) at (9,-3.2) [lbluecell] {\textbf{i}$_{10}$};
\node(49) at (10,-3.2) [lbluecell] {\textbf{n}$_{11}$};
\node(50) at (11,-3.2) [lbluecell] {\textbf{e}$_{12}$};
\node(51) at (12,-3.2) [lbluecell] {\textbf{e}$_{13}$};
\node(52) at (13,-3.2) [lbluecell] {\textbf{r}$_{14}$};
\node(53) at (14,-3.2) [lbluecell] {\textbf{i}$_{15}$};
\node(54) at (15,-3.2) [lbluecell] {\textbf{n}$_{16}$};
\node(55) at (16,-3.2) [lbluecell] {\textbf{g}$_{17}$};
\node(56) at (17,-3.2) [lbluecell] {\textbf{\#}$_{18}$};
\node(57) at (0,-4.2) [redcell] {3};
\node(58) at (1,-4.2) [lbluecell] {\textbf{i}$_{3}$};
\node(59) at (2,-4.2) [lbluecell] {\textbf{n}$_{4}$};
\node(60) at (3,-4.2) [lbluecell] {\textbf{g}$_{5}$};
\node(61) at (4,-4.2) [lbluecell] {\textbf{␣}$_{6}$};
\node(62) at (5,-4.2) [lbluecell] {\textbf{e}$_{7}$};
\node(63) at (6,-4.2) [lbluecell] {\textbf{n}$_{8}$};
\node(64) at (7,-4.2) [lbluecell] {\textbf{g}$_{9}$};
\node(65) at (8,-4.2) [lbluecell] {\textbf{i}$_{10}$};
\node(66) at (9,-4.2) [lbluecell] {\textbf{n}$_{11}$};
\node(67) at (10,-4.2) [lbluecell] {\textbf{e}$_{12}$};
\node(68) at (11,-4.2) [lbluecell] {\textbf{e}$_{13}$};
\node(69) at (12,-4.2) [lbluecell] {\textbf{r}$_{14}$};
\node(70) at (13,-4.2) [lbluecell] {\textbf{i}$_{15}$};
\node(71) at (14,-4.2) [lbluecell] {\textbf{n}$_{16}$};
\node(72) at (15,-4.2) [lbluecell] {\textbf{g}$_{17}$};
\node(73) at (16,-4.2) [lbluecell] {\textbf{\#}$_{18}$};
\node(74) at (0,-5.2) [redcell] {4};
\node(75) at (1,-5.2) [lbluecell] {\textbf{n}$_{4}$};
\node(76) at (2,-5.2) [lbluecell] {\textbf{g}$_{5}$};
\node(77) at (3,-5.2) [lbluecell] {\textbf{␣}$_{6}$};
\node(78) at (4,-5.2) [lbluecell] {\textbf{e}$_{7}$};
\node(79) at (5,-5.2) [lbluecell] {\textbf{n}$_{8}$};
\node(80) at (6,-5.2) [lbluecell] {\textbf{g}$_{9}$};
\node(81) at (7,-5.2) [lbluecell] {\textbf{i}$_{10}$};
\node(82) at (8,-5.2) [lbluecell] {\textbf{n}$_{11}$};
\node(83) at (9,-5.2) [lbluecell] {\textbf{e}$_{12}$};
\node(84) at (10,-5.2) [lbluecell] {\textbf{e}$_{13}$};
\node(85) at (11,-5.2) [lbluecell] {\textbf{r}$_{14}$};
\node(86) at (12,-5.2) [lbluecell] {\textbf{i}$_{15}$};
\node(87) at (13,-5.2) [lbluecell] {\textbf{n}$_{16}$};
\node(88) at (14,-5.2) [lbluecell] {\textbf{g}$_{17}$};
\node(89) at (15,-5.2) [lbluecell] {\textbf{\#}$_{18}$};
\node(90) at (0,-6.2) [redcell] {5};
\node(91) at (1,-6.2) [lbluecell] {\textbf{g}$_{5}$};
\node(92) at (2,-6.2) [lbluecell] {\textbf{␣}$_{6}$};
\node(93) at (3,-6.2) [lbluecell] {\textbf{e}$_{7}$};
\node(94) at (4,-6.2) [lbluecell] {\textbf{n}$_{8}$};
\node(95) at (5,-6.2) [lbluecell] {\textbf{g}$_{9}$};
\node(96) at (6,-6.2) [lbluecell] {\textbf{i}$_{10}$};
\node(97) at (7,-6.2) [lbluecell] {\textbf{n}$_{11}$};
\node(98) at (8,-6.2) [lbluecell] {\textbf{e}$_{12}$};
\node(99) at (9,-6.2) [lbluecell] {\textbf{e}$_{13}$};
\node(100) at (10,-6.2) [lbluecell] {\textbf{r}$_{14}$};
\node(101) at (11,-6.2) [lbluecell] {\textbf{i}$_{15}$};
\node(102) at (12,-6.2) [lbluecell] {\textbf{n}$_{16}$};
\node(103) at (13,-6.2) [lbluecell] {\textbf{g}$_{17}$};
\node(104) at (14,-6.2) [lbluecell] {\textbf{\#}$_{18}$};
\node(105) at (0,-7.2) [redcell] {6};
\node(106) at (1,-7.2) [lbluecell] {\textbf{␣}$_{6}$};
\node(107) at (2,-7.2) [lbluecell] {\textbf{e}$_{7}$};
\node(108) at (3,-7.2) [lbluecell] {\textbf{n}$_{8}$};
\node(109) at (4,-7.2) [lbluecell] {\textbf{g}$_{9}$};
\node(110) at (5,-7.2) [lbluecell] {\textbf{i}$_{10}$};
\node(111) at (6,-7.2) [lbluecell] {\textbf{n}$_{11}$};
\node(112) at (7,-7.2) [lbluecell] {\textbf{e}$_{12}$};
\node(113) at (8,-7.2) [lbluecell] {\textbf{e}$_{13}$};
\node(114) at (9,-7.2) [lbluecell] {\textbf{r}$_{14}$};
\node(115) at (10,-7.2) [lbluecell] {\textbf{i}$_{15}$};
\node(116) at (11,-7.2) [lbluecell] {\textbf{n}$_{16}$};
\node(117) at (12,-7.2) [lbluecell] {\textbf{g}$_{17}$};
\node(118) at (13,-7.2) [lbluecell] {\textbf{\#}$_{18}$};
\node(119) at (0,-8.2) [redcell] {7};
\node(120) at (1,-8.2) [lbluecell] {\textbf{e}$_{7}$};
\node(121) at (2,-8.2) [lbluecell] {\textbf{n}$_{8}$};
\node(122) at (3,-8.2) [lbluecell] {\textbf{g}$_{9}$};
\node(123) at (4,-8.2) [lbluecell] {\textbf{i}$_{10}$};
\node(124) at (5,-8.2) [lbluecell] {\textbf{n}$_{11}$};
\node(125) at (6,-8.2) [lbluecell] {\textbf{e}$_{12}$};
\node(126) at (7,-8.2) [lbluecell] {\textbf{e}$_{13}$};
\node(127) at (8,-8.2) [lbluecell] {\textbf{r}$_{14}$};
\node(128) at (9,-8.2) [lbluecell] {\textbf{i}$_{15}$};
\node(129) at (10,-8.2) [lbluecell] {\textbf{n}$_{16}$};
\node(130) at (11,-8.2) [lbluecell] {\textbf{g}$_{17}$};
\node(131) at (12,-8.2) [lbluecell] {\textbf{\#}$_{18}$};
\node(132) at (0,-9.2) [redcell] {8};
\node(133) at (1,-9.2) [lbluecell] {\textbf{n}$_{8}$};
\node(134) at (2,-9.2) [lbluecell] {\textbf{g}$_{9}$};
\node(135) at (3,-9.2) [lbluecell] {\textbf{i}$_{10}$};
\node(136) at (4,-9.2) [lbluecell] {\textbf{n}$_{11}$};
\node(137) at (5,-9.2) [lbluecell] {\textbf{e}$_{12}$};
\node(138) at (6,-9.2) [lbluecell] {\textbf{e}$_{13}$};
\node(139) at (7,-9.2) [lbluecell] {\textbf{r}$_{14}$};
\node(140) at (8,-9.2) [lbluecell] {\textbf{i}$_{15}$};
\node(141) at (9,-9.2) [lbluecell] {\textbf{n}$_{16}$};
\node(142) at (10,-9.2) [lbluecell] {\textbf{g}$_{17}$};
\node(143) at (11,-9.2) [lbluecell] {\textbf{\#}$_{18}$};
\node(144) at (0,-10.2) [redcell] {9};
\node(145) at (1,-10.2) [lbluecell] {\textbf{g}$_{9}$};
\node(146) at (2,-10.2) [lbluecell] {\textbf{i}$_{10}$};
\node(147) at (3,-10.2) [lbluecell] {\textbf{n}$_{11}$};
\node(148) at (4,-10.2) [lbluecell] {\textbf{e}$_{12}$};
\node(149) at (5,-10.2) [lbluecell] {\textbf{e}$_{13}$};
\node(150) at (6,-10.2) [lbluecell] {\textbf{r}$_{14}$};
\node(151) at (7,-10.2) [lbluecell] {\textbf{i}$_{15}$};
\node(152) at (8,-10.2) [lbluecell] {\textbf{n}$_{16}$};
\node(153) at (9,-10.2) [lbluecell] {\textbf{g}$_{17}$};
\node(154) at (10,-10.2) [lbluecell] {\textbf{\#}$_{18}$};
\node(155) at (0,-11.2) [redcell] {10};
\node(156) at (1,-11.2) [lbluecell] {\textbf{i}$_{10}$};
\node(157) at (2,-11.2) [lbluecell] {\textbf{n}$_{11}$};
\node(158) at (3,-11.2) [lbluecell] {\textbf{e}$_{12}$};
\node(159) at (4,-11.2) [lbluecell] {\textbf{e}$_{13}$};
\node(160) at (5,-11.2) [lbluecell] {\textbf{r}$_{14}$};
\node(161) at (6,-11.2) [lbluecell] {\textbf{i}$_{15}$};
\node(162) at (7,-11.2) [lbluecell] {\textbf{n}$_{16}$};
\node(163) at (8,-11.2) [lbluecell] {\textbf{g}$_{17}$};
\node(164) at (9,-11.2) [lbluecell] {\textbf{\#}$_{18}$};
\node(165) at (0,-12.2) [redcell] {11};
\node(166) at (1,-12.2) [lbluecell] {\textbf{n}$_{11}$};
\node(167) at (2,-12.2) [lbluecell] {\textbf{e}$_{12}$};
\node(168) at (3,-12.2) [lbluecell] {\textbf{e}$_{13}$};
\node(169) at (4,-12.2) [lbluecell] {\textbf{r}$_{14}$};
\node(170) at (5,-12.2) [lbluecell] {\textbf{i}$_{15}$};
\node(171) at (6,-12.2) [lbluecell] {\textbf{n}$_{16}$};
\node(172) at (7,-12.2) [lbluecell] {\textbf{g}$_{17}$};
\node(173) at (8,-12.2) [lbluecell] {\textbf{\#}$_{18}$};
\node(174) at (0,-13.2) [redcell] {12};
\node(175) at (1,-13.2) [lbluecell] {\textbf{e}$_{12}$};
\node(176) at (2,-13.2) [lbluecell] {\textbf{e}$_{13}$};
\node(177) at (3,-13.2) [lbluecell] {\textbf{r}$_{14}$};
\node(178) at (4,-13.2) [lbluecell] {\textbf{i}$_{15}$};
\node(179) at (5,-13.2) [lbluecell] {\textbf{n}$_{16}$};
\node(180) at (6,-13.2) [lbluecell] {\textbf{g}$_{17}$};
\node(181) at (7,-13.2) [lbluecell] {\textbf{\#}$_{18}$};
\node(182) at (0,-14.2) [redcell] {13};
\node(183) at (1,-14.2) [lbluecell] {\textbf{e}$_{13}$};
\node(184) at (2,-14.2) [lbluecell] {\textbf{r}$_{14}$};
\node(185) at (3,-14.2) [lbluecell] {\textbf{i}$_{15}$};
\node(186) at (4,-14.2) [lbluecell] {\textbf{n}$_{16}$};
\node(187) at (5,-14.2) [lbluecell] {\textbf{g}$_{17}$};
\node(188) at (6,-14.2) [lbluecell] {\textbf{\#}$_{18}$};
\node(189) at (0,-15.2) [redcell] {14};
\node(190) at (1,-15.2) [lbluecell] {\textbf{r}$_{14}$};
\node(191) at (2,-15.2) [lbluecell] {\textbf{i}$_{15}$};
\node(192) at (3,-15.2) [lbluecell] {\textbf{n}$_{16}$};
\node(193) at (4,-15.2) [lbluecell] {\textbf{g}$_{17}$};
\node(194) at (5,-15.2) [lbluecell] {\textbf{\#}$_{18}$};
\node(195) at (0,-16.2) [redcell] {15};
\node(196) at (1,-16.2) [lbluecell] {\textbf{i}$_{15}$};
\node(197) at (2,-16.2) [lbluecell] {\textbf{n}$_{16}$};
\node(198) at (3,-16.2) [lbluecell] {\textbf{g}$_{17}$};
\node(199) at (4,-16.2) [lbluecell] {\textbf{\#}$_{18}$};
\node(200) at (0,-17.2) [redcell] {16};
\node(201) at (1,-17.2) [lbluecell] {\textbf{n}$_{16}$};
\node(202) at (2,-17.2) [lbluecell] {\textbf{g}$_{17}$};
\node(203) at (3,-17.2) [lbluecell] {\textbf{\#}$_{18}$};
\node(204) at (0,-18.2) [redcell] {17};
\node(205) at (1,-18.2) [lbluecell] {\textbf{g}$_{17}$};
\node(206) at (2,-18.2) [lbluecell] {\textbf{\#}$_{18}$};
\node(207) at (0,-19.2) [redcell] {18};
\node(208) at (1,-19.2) [lbluecell] {\textbf{\#}$_{18}$};
};
\end{tikzpicture}
\end{center}
\caption{The suffixes of the sequence $S$ sorted by index.}
\label{fig:suffixes}
\end{figure}
